
add_requires("local_libusb")

target("ar8030_usb_test_tool")
    set_kind("binary")
    add_files("main.cpp")
    set_languages("c++14")
    add_files("ar8030_usb_tool.cpp")
    add_files("ar_usb.cpp")
    add_packages("local_libusb")

    if not is_plat("android") then 
        add_links("pthread")
        add_linkorders("usb-1.0" , "pthread")
    end

    on_install(function (target)
        dhpath = path.join(target:installdir() , "dev_helper")
        os.mkdir(dhpath)

        os.cp(target:targetfile() , dhpath)
    end)